var rptMap = require('./fcn/rptMap.js'),
  friends = require('./fcn/friends.js'),
  { backMenu, menuFrd } = require('./common/index.js');

module.exports = function () {
  while (true) {
    let selectValue = dialogs.multiChoice('功能选择', ['刷图', '基建', '好友访问']);
    switch (selectValue.toString()) {
      case '0':
        sleep(1000);
        rptMap();
        break;
      case '1':
        toast('基建');
        break;
      case '2':
        sleep(1000);
        click(359, 580);
        friends();
        break;
      case '0,1':
        toast('刷完和基建');
        break;
      case '0,2': {
        sleep(1000);
        rptMap();
        backMenu();
        menuFrd();
        friends();
        break;
      }
      case '1,2':
        toast('基建和访问');
        break;
      default:
        let count = rawInput('请输入刷图次数：');
        sleep(1000);
        if (count.length > 0) {
          rptMap(count);
          break;
        } else {
          toast('溜了溜了。。')
          break;
        }
    };
    break;
  }
}


